package com.osmino.contacts.model.contacts;

import java.util.Set;

public interface IContact{
	
	public static final int UNDEF_I = -1;
	public static final String UNDEF_S = "_undef";
	public static final String ID_I = "id";
	public static final String ID_RAW_I = "rawid";
	public static final String DISPLAY_NAME_S = "displayname";
	public static final String FIRST_NAME_S = "firstname";
	public static final String LAST_NAME_S = "lastname";
	public static final String PHONES_H_IS = "phones";
	public static final String PHONE_PRI_I = "primaryphone";
	public static final String HAS_PHONE_B = "hasphone";
	public static final String HAS_PHOTO_B = "hasphoto";
	public static final String PHOTO_ID_I = "photoid";
	public static final String ACCOUNT_NAME_S = "accountname";
	public static final String ACCOUNT_TYPE_S = "accounttype";
	public static final String PHOTO_BD = "photo";//BitmapDrawable
	
	public void setData(String which, Object object);
	public <T> T getData(String which);
	public <T> T getData(String which, Class<T> type);
	public IContactBuilder getBuilder();
	public Set<String> getKeys();
	public boolean containsKey(String key);
	public int size();
	public boolean isEmpty();
}


/**

ContactProviderProxy manager = new ContactProviderProxy(this, new ContactProviderFake());

List<Contact> list = manager.select();

Log.e("CONTACT", "SELECT===================================================================");

for (Contact c : list) {
	int id = c.getData(ContactAndroid.ID);
	String name = c.getData(ContactAndroid.NAME);
	Log.e("CONTACT", String.format("Contact: id-%d, name-%s", id, name));
}




Log.e("CONTACT", "ADD===================================================================");
List<Contact> addList = new ArrayList<Contact>();
for (int i = 0; i < 5; i++) {
	addList.add(new ContactBuilderAndroid().set(ContactAndroid.ID, 200 + i)
			.set(ContactAndroid.NAME, "Added Contact #" + i).create());
}
manager.add(addList);
list = manager.select();



Log.e("CONTACT", "SELECT===================================================================");
for (Contact c : list) {
	int id = c.getData(ContactAndroid.ID);
	String name = c.getData(ContactAndroid.NAME);
	Log.e("CONTACT", String.format("Contact: id-%d, name-%s", id, name));
}



Log.e("CONTACT", "DELETE===================================================================");

List<Contact> deleteList = addList;
manager.delete(deleteList);





Log.e("CONTACT", "SELECT===================================================================");
list = manager.select();
for (Contact c : list) {
	int id = c.getData(ContactAndroid.ID);
	String name = c.getData(ContactAndroid.NAME);
	Log.e("CONTACT", String.format("Contact: id-%d, name-%s", id, name));
}


**/